﻿using System;
using System.IO;
using System.Net.Sockets;

class Program{
    public static void Main(string[] args){
        Console.WriteLine("0");
        TcpClient client = new TcpClient("10.32.233.170",9090);
        try{
            Console.WriteLine("1");
            Stream s = client.GetStream();
            Console.WriteLine("2");
            StreamReader sr = new StreamReader(s);
            Console.WriteLine("3");
            String line;
            while (true)
            {
                line = sr.ReadLine();
                Console.WriteLine(line);
            }            
            s.Close();
            Console.ReadLine();
        }finally{
            // code in finally block is guranteed 
            // to execute irrespective of 
            // whether any exception occurs or does 
            // not occur in the try block
            client.Close();
        } 
    }
}